<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<title></title>
<link href="css/mui.min.css" rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="css/loading.min.css" />
<link href="fonts/iconfont.css" rel="stylesheet" />
<link href="css/style.css" rel="stylesheet" />
<style>
.baseInfo{clear: both; overflow: hidden; padding: 20px 10px; background: #fff}
.baseInfo li{clear: both; overflow: hidden; margin-bottom: 15px}
.baseInfo li label{display: block; float: left; width: 80px; text-align: right; font-size: 14px}
.baseInfo li p{margin: 0; margin-left: 100px;}
</style>
</head>
<body>
<div id="app">
	<header class="mui-bar mui-bar-nav in-bar">    
		<a href="javascript:window.hostory.go(-1)" class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		<h1 class="mui-title">个人资料</h1>
		<a href="javascript:window.location.href='edit.htm'" id="searchIcon" class="mui-icon mui-icon-compose mui-pull-right"></a>
	</header> 
	
	<div class="mui-content">
		<div class="userFace">
			<div class="face">
				<i class="icon icon-huiyuan"></i>
			</div>
			<div class="userInfo">
				<p>账户：{{userinfo.name}}</p>
			</div>
		</div>
		
		<div class="baseInfo">
			<li>
				<label>姓名</label>
				<p v-text="baseinfo.name"></p>
			</li>
			<li>
				<label>电话</label>
				<p v-text="baseinfo.phone"></p>
			</li>
			<li>
				<label>QQ</label>
				<p v-text="baseinfo.QQ"></p>
			</li>
			<li>
				<label>微信</label>
				<p v-text="baseinfo.weixin"></p>
			</li>
		</div>
	</div>	
</div>
<script src="js/mui.min.js"></script>
<script src="js/vue.min.js"></script>
<script src="js/loading.js"></script>
<script src="js/app.js"></script>
<script type="text/javascript" charset="utf-8">	
app.init();
if (!app.checkLogin()) {
	window.location.href='login.htm';
};
var vm = new Vue({
	el:"#app",
	data:{
		userinfo : {},
		baseinfo:{}
	},
	methods:{
		goUrl : function(url){
			window.location.href=url;
		}		
	},
	created : function(){		
		that = this;
		that.userinfo = app.getState();

		mui.showLoading();
		request = {
			command:14,
			user:that.userinfo.name,
			psword:that.userinfo.password
		};
		mui.get(api,request,function(res){
			mui.hideLoading();
			if(res.response.code==0){
				that.baseinfo = res.body;				
			}else{
				mui.toast(res.response.desc)
			}
		},'json');
	},
	updated : function(){
		
	}
});
</script>
</body>
</html>